package edu.calvin.djs32.cs214.interpreters.calculator.primitives;

import edu.calvin.cs214.hobbes2008.HobbesTIR;
import edu.calvin.cs214.hobbes2008.IntegerTIR;
import edu.calvin.djs32.cs214.interpreters.calculator.Applicable;
import edu.calvin.djs32.cs214.interpreters.calculator.ICalculator;

public class AbsPrimitive implements Applicable{

	public HobbesTIR apply(ICalculator calc, HobbesTIR... tir) {
		IntegerTIR arg0 = (IntegerTIR) tir[0];
		return new IntegerTIR(Math.abs(arg0.getInt()));
	}
}
